package com.cham.video.service.impl;

import com.cham.video.dto.VideoInfo;
import com.cham.video.entity.ChamVideo;
import com.cham.video.entity.ChamVideoFenzu;
import com.cham.video.mapper.*;
import com.cham.video.service.VideoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Howl-Xu
 * @version 1.0.0
 * @Description: 请描述一下这个类文件吧
 * @createTime 2020年03月15日 09:54:00
 */
@Service
public class VideoServiceImpl implements VideoService {
    @Resource
    private VideoMapper videoMapper;

    @Resource
    private VideoFenzuMapper videoFenzuMapper;



    @Override
    public List<VideoInfo> getVideoInfoTop12ByFenquParent(String fenquParent) {
        return videoMapper.getVideoInfoTop12ByFenquParent(fenquParent);
    }
//
//    @Override
//    public List<VideoInfo> getVideoInfoTop10TodayByFenquParent(String fenquParent) {
//        return videoMapper.getVideoInfoTop10TodayByFenquParent(fenquParent);
//    }
//
//    @Override
//    public List<VideoInfo> getVideoInfoFenquParentTop11(String fenquParent) {
//        return videoMapper.getVideoInfoFenquParentTop11(fenquParent);
//    }

//    @Override
//    public List<VideoInfo> getVideoInfoTop4Today() {
//        return videoMapper.getVideoInfoTop4Today();
//    }

    @Override
    public List<VideoInfo> getVideoInfoTop6() {
        return videoMapper.getVideoInfoTop6();
    }

    @Override
    public void saveVideoInfo(ChamVideo chamVideo) {
        videoMapper.saveVideoInfo(chamVideo);
    }

    @Override
    public void saveXinfanInfo(ChamVideo chamVideo) {
        videoMapper.saveXinfanInfo(chamVideo);
    }

    @Override
    public void saveSPVideoInfo(ChamVideo chamVideo) {
        videoMapper.saveSPVideoInfo(chamVideo);
    }

    @Override
    public List<VideoInfo> getVideoInfoSpecial() {
        return videoMapper.getVideoInfoSpecial();
    }

//    @Override
//    public List<VideoInfo> getXinfanTop12() {
//        return videoMapper.getXinfanTop12();
//    }

    @Override
    public List<VideoInfo> getXinfan1dayTop10() {
        return null;
        //return xinfanMapper.getXinfan1dayTop10();
    }

    @Override
    public List<VideoInfo> getXinfan3dayTop10() {
        return null;
        //return xinfanMapper.getXinfan3dayTop10();
    }

    @Override
    public List<VideoInfo> getXinfan7dayTop10() {
        return null;
        //return xinfanMapper.getXinfan7dayTop10();
    }

    @Override
    public List<VideoInfo> getVideoInfo1dayTop10ByFenquParent(String fenquParent) {
        return videoMapper.getVideoInfo1dayTop10ByFenquParent(fenquParent);
    }

    @Override
    public List<VideoInfo> getVideoInfo3dayTop10ByFenquParent(String fenquParent) {
        return videoMapper.getVideoInfo3dayTop10ByFenquParent(fenquParent);
    }

    @Override
    public List<VideoInfo> getVideoInfo7dayTop10ByFenquParent(String fenquParent) {
        return videoMapper.getVideoInfo7dayTop10ByFenquParent(fenquParent);
    }

    @Override
    public List<ChamVideoFenzu> getXinfanFenzu() {
        return videoFenzuMapper.getXinfanFenzu();
    }

//    @Override
//    public List<ChamXinfanFenzu> getXinfanFenzu() {
//        return xinfanFenzuMapper.getXinfanFenzu();
//    }

//    @Override
//    public int getXinfanFenzuIndexByXinfanFenzuId(int xinfanFenzuId) {
//        return videoMapper.getXinfanFenzuIndexByXinfanFenzuId(xinfanFenzuId);
//    }

    @Override
    public List<VideoInfo> getVideoInfoByFenzuId(int fenzuId) {
        return videoMapper.getVideoInfoByFenzuId(fenzuId);
    }

    @Override
    public int getMaxFenzuIndexByFenzuId(int fenzuId) {
        return videoMapper.getMaxFenzuIndexByFenzuId(fenzuId);
    }

    @Override
    public List<ChamVideoFenzu> getFenzuInfoByUUID(String userUUID) {
        return videoFenzuMapper.getFenzuInfoByUUID(userUUID);
    }

    @Override
    public void addNewNormalFenzu(String newFenzuName, String userUUID) {
        videoFenzuMapper.addNewNormalFenzu(newFenzuName,userUUID);
    }

    @Override
    public void addNewXinfanFenzu(String newFenzuName) {
        videoFenzuMapper.addNewXinfanFenzu(newFenzuName);
    }

    @Override
    public void addBofangCount(int videoId) {
        videoMapper.addBofangCount(videoId);
    }

    @Override
    public List<VideoInfo> getVideoInfoRandom10ByFenquParent(String fenquParent) {
        return videoMapper.getVideoInfoRandom10ByFenquParent(fenquParent);
    }

    @Override
    public List<VideoInfo> getXinfanCurrentUpdate() {
        return videoMapper.getXinfanCurrentUpdate();
    }

    @Override
    public List<VideoInfo> getJingxuanTop4Video(String fenquParent) {
        return videoMapper.getJingxuanTop4Video(fenquParent);
    }

    @Override
    public List<VideoInfo> getVideoInfoTop12ByFenquParentAndChild(String fenquParent, String fenquChild) {
        return videoMapper.getVideoInfoTop12ByFenquParentAndChild(fenquParent,fenquChild);
    }

    @Override
    public List<VideoInfo> getVideoInfoFenyeByFenquParentAndChild(String fenquParent, String fenquChild,int start, int pageSize) {
        return videoMapper.getVideoInfoFenyeByFenquParentAndChild(fenquParent,fenquChild,start,pageSize);
    }

    @Override
    public List<VideoInfo> getVideoInfo1dayTop10ByFenquParentAndChild(String fenquParent, String fenquChild) {
        return videoMapper.getVideoInfo1dayTop10ByFenquParentAndChild(fenquParent,fenquChild);
    }

    @Override
    public List<VideoInfo> getVideoInfo3dayTop10ByFenquParentAndChild(String fenquParent, String fenquChild) {
        return videoMapper.getVideoInfo3dayTop10ByFenquParentAndChild(fenquParent,fenquChild);
    }

    @Override
    public List<VideoInfo> getVideoInfo7dayTop10ByFenquParentAndChild(String fenquParent, String fenquChild) {
        return videoMapper.getVideoInfo7dayTop10ByFenquParentAndChild(fenquParent,fenquChild);
    }

    @Override
    public int getCountOfVideoByFenquParentAndChild(String fenquParent, String fenquChild) {
        return videoMapper.getCountOfVideoByFenquParentAndChild(fenquParent,fenquChild);
    }

//    @Override
//    public void saveChamVideoCoverImg(ChamVideoCoverImg coverImg) {
//        coverMapper.saveChamVideoCoverImg(coverImg);
//    }

}
